<template>
    <div class="about">
        <div id="app">
        <div>
            <table border="1" cellspacing="0" width="60%">
                <thead>
                <tr>
                    <th>订单号</th>
                    <th>电影名</th>
                    <th>放映时间</th>
                    <th>票价</th>
                    <th>购买数量</th>
                    <th>总价</th>
                </tr>
                </thead>
                <tbody v-for="(item,index) in order" :key="index">
                <tr>
                    <td>{{item.id}}</td>
                    <td>{{item.name}}</td>
                    <td>{{item.time}}</td>
                    <td>{{item.price}}</td>
                    <td>{{item.num}}</td>
                    <td>{{item.money}}</td>
                </tr>
                </tbody>
            </table>
        </div>

    </div>
    </div>
</template>

<script>
    export default {
        name:'about',
        data(){
            return{
                order:[]
            }
        },
        mounted() {
            this.init()
        },
        methods:{
            init: function () {
                this.$axios.get("/findAll/findAll").then(
                    r => this.order = r.data //r就是请求出来的数据
                )
            }
        }
    }
</script>


<style>

</style>